package cn.git.agent;

import cn.git.agent.match.ClassMatch;
import cn.git.agent.match.MultiAnnotationMatch;

/**
 * @description: 定义springMVC的RestController拦截插件
 * @program: bank-credit-sy
 * @author: lixuchun
 * @create: 2024-12-24
 */
public class SpringMVCRestControllerInstrumentation extends SpringMVCCommonInstrumentation {

    /**
     * 控制器注解名称
     */
    public static final String REST_CONTROLLER_NAME = "org.springframework.web.bind.annotation.RestController";

    /**
     * 拦截器类
     */
    public static final String SPRINGMVC_INTERCEPTOR_CLASS = "cn.git.agent.interceptor.SpringMVCInterceptor";

    /**
     * 获取需要拦截的类
     *
     * @return
     */
    @Override
    protected ClassMatch enhanceClass() {
        return MultiAnnotationMatch.byMultiAnnotationMatch(REST_CONTROLLER_NAME);
    }

}
